package artid.com.arttogo.bean;

import org.json.JSONObject;
import java.io.Serializable;

/**
 * 首页-搜索实体类+解析
 */
public class ArtList extends AppItem implements Serializable {
	private int height;//图片高度
	private String art_id;//艺术品ID
	private String title;//艺术品标题
	private String pic_url;//艺术品缩略图
	private String path;//艺术家头像
	private String realname;//艺术家名字
	private int is_type;//类型1:艺术家2：机构
	private String artist_id;//
	@Override
	public void parse(JSONObject obj) {
		if (null == obj) {
			return;
		}
		height =  obj.optInt("height");
		art_id = obj.optString("art_id");
		title = obj.optString("title");
		pic_url = obj.optString("pic_url");
		realname = obj.optString("realname");
		path = obj.optString("path");
		is_type =  obj.optInt("is_type");
		artist_id = obj.optString("artist_id");
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public String getArt_id() {
		return art_id;
	}

	public void setArt_id(String art_id) {
		this.art_id = art_id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getPic_url() {
		return pic_url;
	}

	public void setPic_url(String pic_url) {
		this.pic_url = pic_url;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public int getIs_type() {
		return is_type;
	}

	public void setIs_type(int is_type) {
		this.is_type = is_type;
	}

	public String getArtist_id() {
		return artist_id;
	}

	public void setArtist_id(String artist_id) {
		this.artist_id = artist_id;
	}

	public ArtList() {
	}

	public ArtList(int height, String art_id, String title, String pic_url, String path, String realname, int is_type, String artist_id) {
		this.height = height;
		this.art_id = art_id;
		this.title = title;
		this.pic_url = pic_url;
		this.path = path;
		this.realname = realname;
		this.is_type = is_type;
		this.artist_id = artist_id;
	}

	@Override
	public String toString() {
		return "ArtList{" +
				"height=" + height +
				", art_id='" + art_id + '\'' +
				", title='" + title + '\'' +
				", pic_url='" + pic_url + '\'' +
				", path='" + path + '\'' +
				", realname='" + realname + '\'' +
				", is_type=" + is_type +
				", artist_id='" + artist_id + '\'' +
				'}';
	}
}
